package top.caozj.conf;

import com.fasterxml.jackson.databind.JsonNode;

/**
 * Copyright (c) 2010, 2025, xjk All rights reserved.
 *   "mqtt": {
 *     "host": "127.0.0.1",
 *     "port": 1883,
 *     "topic": "test",
 *     "username": "root",
 *     "password": "root"
 *   }
 *
 * @author caozj thucaozj@outlook.com
 * @version 1.0
 * @date 2025-03-25
 * @since 20
 * Mqtt服务器配置类
 */

public class MqttConf {
    /**
     * Mqtt服务器地址
     */
    private String host;

    /**
     * Mqtt服务器端口
     */
    private int port;
    private String topic;
    private String username;
    private String password;

    public MqttConf(String host, int port, String topic, String username, String password) {
        this.host = host;
        this.port = port;
        this.topic = topic;
        this.username = username;
        this.password = password;
    }

    public MqttConf() {
    }

    @Override
    public String toString() {
        return "MqttConf{" +
                "host='" + host + '\'' +
                ", port=" + port +
                ", topic='" + topic + '\'' +
                ", username='" + username + '\''
              ;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
